import Vue from 'vue';
const service = Vue.prototype.$http;

/**
 * Author: CreateSun
 * Date: 2020/8/14
 * Description: 项目公告请求
 */

/**
 * 发布项目公告
 * @param params = {
  "isTop": 0,
  "noticeContent": "string",
  "noticeProject": "string",
  "noticeTitle": "string"
}
 * @returns {AxiosPromise}
 */
export const notice = params => {
    return service({
        url: 'notice/post',
        method: 'post',
        data: params
    });
};

/**
 *
 * @param params = {projectId}
 * @returns {AxiosPromise}
 */
export const noticeShow = params => {
    return service({
        url: 'notice/show',
        method: 'get',
        params
    });
};

/**
 * 删除公告
 * @param params = {noticeId}
 * @returns {AxiosPromise}
 */
export const noticeRemove = params => {
    return service({
        url: 'notice/remove',
        method: 'delete',
        params
    });
};
/**
 * 修改公告
 * @param params = {
  "isTop": 0,
  "noticeContent": "string",
  "noticeProject": "string",
  "noticeTitle": "string"
}
 * @returns {AxiosPromise}
 */
// export const noticeChange = params => {
//     return service({
//         url: '/notice/change',
//         method: 'put',
//         params
//     });
// };
